package com.ruoyi.report.service.impl;

import java.util.List;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.report.domain.TPopularizeArticle;
import com.ruoyi.report.mapper.TPopularizeArticleMapper;
import com.ruoyi.report.service.ITPopularizeArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 文章分类Service业务层处理
 * 
 * @author administrator
 * @date 2025-02-12
 */
@Service
public class TPopularizeArticleServiceImpl implements ITPopularizeArticleService
{
    @Autowired
    private TPopularizeArticleMapper tPopularizeArticleMapper;

    /**
     * 查询文章分类
     * 
     * @param id 文章分类ID
     * @return 文章分类
     */
    @Override
    public TPopularizeArticle selectTPopularizeArticleById(Long id)
    {
        return tPopularizeArticleMapper.selectTPopularizeArticleById(id);
    }

    /**
     * 查询文章分类列表
     * 
     * @param tPopularizeArticle 文章分类
     * @return 文章分类
     */
    @Override
    public List<TPopularizeArticle> selectTPopularizeArticleList(TPopularizeArticle tPopularizeArticle)
    {
        return tPopularizeArticleMapper.selectTPopularizeArticleList(tPopularizeArticle);
    }

    /**
     * 新增文章分类
     * 
     * @param tPopularizeArticle 文章分类
     * @return 结果
     */
    @Override
    public int insertTPopularizeArticle(TPopularizeArticle tPopularizeArticle)
    {
        return tPopularizeArticleMapper.insertTPopularizeArticle(tPopularizeArticle);
    }

    /**
     * 修改文章分类
     * 
     * @param tPopularizeArticle 文章分类
     * @return 结果
     */
    @Override
    public int updateTPopularizeArticle(TPopularizeArticle tPopularizeArticle)
    {
        return tPopularizeArticleMapper.updateTPopularizeArticle(tPopularizeArticle);
    }

    /**
     * 删除文章分类对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTPopularizeArticleByIds(String ids)
    {
        return tPopularizeArticleMapper.deleteTPopularizeArticleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除文章分类信息
     * 
     * @param id 文章分类ID
     * @return 结果
     */
    @Override
    public int deleteTPopularizeArticleById(Long id)
    {
        return tPopularizeArticleMapper.deleteTPopularizeArticleById(id);
    }
}
